<?php
/**
 * Project: Recipe
 * File: SpecialCategoryModel.class.php
 * Author: Xnfy520@gmail.com
 * Date: 12-5-5
 * Time: 上午10:11
 */

class SpecialCategoryModel extends RelationModel{

	protected $_validate = array(
		array('name', 'require', '特殊食谱分类名称不能为空', 1, 'regex', 3),
		array('sort', 'number', '排序必须为数字', 1, 'regex', 3),
	);

	protected $_link = array(

		'SpecialArticle'=>array(
			'mapping_type'=>HAS_MANY,
			'mapping_name'=>'specialarticle',
			'class_name'=>'SpecialArticle',
			'foreign_key'=>'categoryid',
		),

	);

}